#include "VectorFloat.h"
#include <iostream>
#include <string>
#include <vector>

using namespace std;


VectorFloat::VectorFloat(void)
{
	CreateVector(0);
}

VectorFloat::VectorFloat(int s)
{
	CreateVector(s);
}

VectorFloat::~VectorFloat(void)
{
	DeleteVector();
}

void VectorFloat::CreateVector(int s)
{
	if (s == 0) {
		size = s;
		vptr = nullptr;
	}
	else {
		size = s;
		vptr = new float[size];
	}

}

void VectorFloat::DeleteVector()
{
	delete vptr;
}

void VectorFloat::Set(float value, int index)
{
	if (index >= 0 && index < size) {
		vptr[index] = value;
	}
	else
		cout << "Incorrect index!" << endl;
}

void VectorFloat::ReadFromKeyboard()
{
	
	cin >> vptr.push_back();
}
